package com.ruoyi.web.controller.channel;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.SysMarket;
import com.ruoyi.system.domain.SysPayload;
import com.ruoyi.system.domain.SysPaysum;
import com.ruoyi.system.service.ISysPayloadService;
import com.ruoyi.system.service.ISysPaysumService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/system/paysum")
public class PaysumController extends BaseController {
    @Resource
    ISysPaysumService iSysPaysumService;
    /**
     * 获取支付渠道列表
     */
    @PreAuthorize("@ss.hasPermi('system:paysum:list')")
    @GetMapping("/list")
    public TableDataInfo list(SysPaysum paysum)
    {
        startPage();
        List<SysPaysum> list = iSysPaysumService.selectPaysumList(paysum);
        System.out.println(list.get(0).getAdsum());
        return getDataTable(list);
    }
}
